<?php
/**
 * Project: Recipe
 * File: RecipeFavouriteModel.class.php
 * Author: Xnfy520@gmail.com
 * Date: 12-6-5
 * Time: 下午2:02
 */

	class RecipeFavouriteModel extends RelationModel{

			protected $_link = array(

				'RecipeArticle'=>array(
					'mapping_type'=>BELONGS_TO,
					'mapping_name'=>'recipearticle',
					'class_name'=>'RecipeArticle',
					'foreign_key'=>'articleid',
					'condition'=>'recipetypeid=1',
				),

				'SpecialArticle'=>array(
					'mapping_type'=>BELONGS_TO,
					'mapping_name'=>'specialarticle',
					'class_name'=>'SpecialArticle',
					'foreign_key'=>'articleid',
					'condition'=>'recipetypeid=2',
				),

				'SauceArticle'=>array(
					'mapping_type'=>BELONGS_TO,
					'mapping_name'=>'saucearticle',
					'class_name'=>'SauceArticle',
					'foreign_key'=>'articleid',
					'condition'=>'recipetypeid=3',
				),

				'KitchenArticle'=>array(
					'mapping_type'=>BELONGS_TO,
					'mapping_name'=>'kitchenarticle',
					'class_name'=>'KitchenArticle',
					'foreign_key'=>'articleid',
					'condition'=>'recipetypeid=4',
				),
			);
	}